#include "widget.h"
#include "ui_widget.h"
#include<QDebug>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand(time(0));
    //mybutton=new QPushButton(this);
    //mybutton->move(200,200);
    //this->move(1000,0);

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_3_clicked()
{
    ui->label->setText("扫码还是支付宝");
}

void Widget::on_pushButton_2_pressed()
{

    QRect r=this->geometry();
    int x=rand()%r.width();
    int y=rand()%r.height();

    ui->pushButton_2->move(x,y);

}
